package com.ccxe.manage.page;

import java.util.ArrayList;
import java.util.List;

public class PagerList{
	
	private Pager pager;
	
	private List list=null;
	
	
	public PagerList(List managerList,int currentPage,int pageSize){
		list=new ArrayList();
		pager=new Pager(currentPage,pageSize); 
		int startNum=pager.getStartNum();
		int lastNumTemp=pager.getStartNum()+pageSize;
		int lastNum=lastNumTemp>managerList.size()?managerList.size():lastNumTemp;
		
		for(int i=startNum;i<lastNum;i++){
			list.add(managerList.get(i));
		}
		
	}
	public Pager getPager() {
		return pager;
	}

	public void setPager(Pager pager) {
		pager = pager;
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}
	
}
